# -*- coding: utf-8 -*-#

from config import db


class User(db.Model):
    __tablename__ = "user"
    userid = db.Column(db.Integer, primary_key=True)
    password = db.Column(db.String)


class CarInfo(db.Model):
    __tablename__ = "carinfo"
    id = db.Column(db.Integer, primary_key=True)
    img = db.Column(db.String)
    brand = db.Column(db.String)
    cx_price = db.Column(db.String)
    level = db.Column(db.String)
    rating = db.Column(db.String)
    cehicle_capacity = db.Column(db.String)


class Log(db.Model):
    __tablename__ = "log"
    id = db.Column(db.Integer, primary_key=True)
    userid = db.Column(db.Integer)
    carid = db.Column(db.Integer)
    lookup_time = db.Column(db.DateTime)